package dome5;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 时间复杂度课后习题
 * User: 王圆豪
 * Date: 2024-07-06
 * Time: 18:17
 */
public class Test {
    public static void main1(String[] args) {
        Scanner  sc = new Scanner(System.in);
        int n = sc.nextInt();
        int add = Integer.MAX_VALUE;
        int h = 0;
        int l = 0;
        int[] num = new int[]{1, 2, 3, 4, 5};
        for (int i = 0; i < num.length - 1; i++) {
            for (int j = i + 1; j < num.length; j++) {
                int b = Math.abs(num[i] + num[j] - n);
                if (b < add){
                    add = b;
                    h = num[i];
                    l = num[j];
                }
            }
        }
        System.out.println(h + " " + l);
    }
}
